import {SAVE_CHANNEL_LISTS, SAVE_CHANNEL_POSITION, SAVE_ISLOAD} from "./constants";

const defaultState = {
  // channelLists: [[{name: "FAM", isSelected: true}, {name: "SYBR", isSelected: true}, {name: "EvaGreen", isSelected: true}],
  //   [{name: "VIC", isSelected: true}, {name: "HEX", isSelected: true}, {name: "JOE", isSelected: true}, {name: "540", isSelected: true}, {name: "560", isSelected: true}],
  //   [{name: "TAMRA", isSelected: true}, {name: "CY3", isSelected: true}],
  //   [{name: "ROX", isSelected: true}, {name: "TEX615", isSelected: true}, {name: "610", isSelected: true}],
  //   [{name: "CY5", isSelected: true}, {name: "LIZ", isSelected: true}, {name: "Mustang Purple", isSelected: true}, {name: "Quasar 670", isSelected: true}],
  //   [{name: "CY5.5", isSelected: true}, {name: "Quasar 705", isSelected: true}]],
  channelLists: [[{name: "FAM", isSelected: true}, {name: "SYBR", isSelected: true}/*, {name: "EvaGreen", isSelected: true}*/],
    [{name: "VIC", isSelected: true}, {name: "HEX", isSelected: true}, {name: "JOE", isSelected: true}/*, {name: "540", isSelected: true}, {name: "560", isSelected: true}*/],
    [{name: "TAMRA", isSelected: true}, {name: "CY3", isSelected: true}],
    [{name: "ROX", isSelected: true}, {name: "TEX615", isSelected: true},{name:"TEXAS RED",isSelected: true}/*, {name: "610", isSelected: true}*/],
    [{name: "CY5", isSelected: true}/*, {name: "LIZ", isSelected: true}, {name: "Mustang Purple", isSelected: true}, {name: "Quasar 670", isSelected: true}*/],
    [{name: "CY5.5", isSelected: true}, {name: "Quasar 705", isSelected: true}]],
  channelPosition: [
    ["FAM", "SYBR"/*, "EvaGreen"*/],
    ["VIC", "HEX", "JOE"/*, "540", "560"*/],
    ["TAMRA", "CY3"],
    ["ROX", "TEX615", "TEXAS RED"/*"610"*/],
    ["CY5"/*, "LIZ", "Mustang Purple", "Quasar 670"*/],
    ["Quasar 705", "CY5.5"]],
  isSave:-1
};

export default function reducer(state = defaultState, action) {
  switch (action.type) {
    case SAVE_CHANNEL_LISTS :
      return {...state, channelLists: action.channelLists};
    case SAVE_CHANNEL_POSITION :
      return {...state, channelPosition: action.channelPosition};
      case SAVE_ISLOAD :
      return {...state, isSave: action.isSave};
    default:
      return state;
  }
}
